package com.matt.domain.news;

import com.matt.commons.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * *******************************
 * Created by lch.
 * form com.matt
 * on 2018/11/28
 * *******************************
 */
@Entity
@Data
@Table(name = "system_notification_menu")
@EqualsAndHashCode(callSuper = true)
public class SystemNotificationMenu extends Domain {

    @Column(columnDefinition = "varchar(32) COMMENT '菜单id'")
    private String menuId;

    @Column(columnDefinition = "varchar(255) COMMENT '菜单名称'")
    private String menuName;

    @Column(columnDefinition = "varchar(32) COMMENT '通告id'")
    private String systemNotificationId;

    @Column(columnDefinition = "int default 0 COMMENT '分类 0：无勾选编辑  1：有勾选编辑框'")
    private Integer isEdit=0;

    @Column(columnDefinition = "longtext COMMENT '内容'")
    private String content;

    public static  SystemNotificationMenu of(String menuId, String menuName, String systemNotificationId,String content){
        SystemNotificationMenu vo = new SystemNotificationMenu();
        vo.setMenuId(menuId);
        vo.setMenuName(menuName);
        vo.setContent(content);
        vo.setSystemNotificationId(systemNotificationId);
        return vo;
    }
}
